Deutsch English Français Italiano |
<ug7sh8$pcc$1@colo-sc-1.gslin.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!.POSTED.114-34-121-114.hinet-ip.hinet.net!not-for-mail From: Gea-Suan Lin <gslin@gslin.org> Newsgroups: news.software.nntp Subject: Re: Getting spamassassin and clamav as inn filters Date: Thu, 12 Oct 2023 04:26:16 -0000 (UTC) Organization: Hasname Message-ID: <ug7sh8$pcc$1@colo-sc-1.gslin.com> References: <ug14cb$a9g$15@gallifrey.nk.ca> Injection-Date: Thu, 12 Oct 2023 04:26:16 -0000 (UTC) Injection-Info: colo-sc-1.gslin.com; posting-host="114-34-121-114.hinet-ip.hinet.net:114.34.121.114"; logging-data="25996"; mail-complaints-to="usenet@colo-sc-1.gslin.com" User-Agent: slrn/1.0.3 (Linux) Bytes: 1745 Lines: 35 On 2023-10-09, The Doctor <doctor@doctor.nl2k.ab.ca> wrote: > Any recipes how? Yeah, I just implemented a simple hack within `cleanfeed.local`. Have tried, but not so useful. Still many spam into comp.lang.c and other groups. The most efficient way to avoid Google Groups spam for now is just giving up anything from Google Groups. ``` use Mail::SpamAssassin; my $sa_agent = Mail::SpamAssassin->new(); sub local_filter_last { return unless $hdr{Path} =~ /google-groups\.googlegroups\.com/; my %myhdr = %hdr; delete $myhdr{__BODY__}; delete $myhdr{__LINES__}; my $header_str = join "\n", map { "$_: $hdr{$_}" } keys %myhdr; my $article_str = "$header_str\n\n$hdr{__BODY__}"; my $mail = $sa_agent->parse($article_str); my $status = $sa_agent->check($mail); return reject("Reject Google Groups posting to $hdr{Newsgroups} by SpamAssassin") if $status->is_spam(); $status->finish(); $mail->finish(); return; } ```